<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
	<center>
		<form action="{url:/exam/register}" method="post">
			用户名: <input type="text" name="name" id="name"><br>
			密码： <input type="text" name="pwd" id="pwd"><br>
			邮箱: <input type="text" name="email" id="email"><br>
			<input type="button" id="btn" value="注册">
		</form>
	</center>
</body>
</html>
<script type=""></script>
<script>
	$("#btn").click(function){
		var name = $('#name').val();
		var pwd = $("#pwd").val();
		var email = $('#email').val();
		if(name==""||pwd=""||email==""){
			alert('输入内容不能为空');
			return false;
		}
		var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9_])+\.)+([a-zA-Z0-9_]{2,4})+$/;
		if(!filter.test(email)){
			alert('您额电子邮件格式不正确');
			return false;
		}
			$("form").submit();
			
		}
</script>